import request from '@/utils/request'
// 查询承运商列表
export function getCompaniesistList(query) {
    return request({
      url: '/system/companies/list',
      method: 'get',
      params: query
    })
}

// 新增承运商
export function addCompaniesist(data) {
    return request({
      url: '/system/companies',
      method: 'post',
      data
    })
}

// 修改
export function editCompaniesist(data) {
  return request({
    url: '/system/companies',
    method: 'put',
    data
  })
}

//  删除承运商
export function deleteCompaniesist(ids) {
  return request({
    url: '/system/companies/' + ids.join(','),
    method: 'delete'
  })
}

// 查询所有承运商
export function getCompaniesListAll(query) {
  return request({
    url: '/system/companies/findAll',
    method: 'get',
    params: query
  })
}

// 网点列表
export function getPointsList(query) {
    return request({
      url: '/system/points/list',
      method: 'get',
      params: query
    })
}
// 新增网点
export function addPointsList(data) {
  return request({
    url: '/system/points',
    method: 'post',
    data
  })
}

// 修改网点
export function editPoints(data) {
  return request({
    url: '/system/points',
    method: 'put',
    data
  })
}

// 删除网点
export function deletePoints(ids) {
  return request({
    url: '/system/points/' + ids.join(','),
    method: 'delete'
  })
}

// 承运商审核
export function certificaInfo(data) {
  return request({
    url: '/system/companies/status',
    method: 'post',
    data
  })
}

// 驳回
export function rejectInfo(data) {
  return request({
    url: '/system/companies/reject',
    method: 'post',
    data
  })
}

//网点审核
export function certificaPointsInfo(data) {
  return request({
    url: '/system/points/status',
    method: 'post',
    data
  })
}

//网点驳回
export function rejectPointsInfo(data) {
  return request({
    url: '/system/points/reject',
    method: 'post',
    data
  })
}

// 承运商置顶
export function companiesOnTop(data) {
  return request({
    url: '/system/companies/onTop',
    method: 'post',
    data
  })
}
